package jfuzzyprincepless.zarchive.algorithm.structure.forcnstr;

import java.util.*;

import jfuzzyprincepless.agents.INegotiatingAgent;
import jfuzzyprincepless.zarchive.algorithm.structure.ICommandConstruction;

/**
 * easiest implementation of fuzzy for structure: for absolutely each
 * for absolutely each construction
 */
// DECIDE: implement get membership as service ???
public class NegotiationForAbsEach<E>
	extends BaseNegotiationFor<E>
{
	protected List<E> forEachSet;

	public NegotiationForAbsEach(
		List<E> forEachSet,
		ICommandConstruction[] forBodyCommands,
		List<INegotiatingAgent> agents
	) {
		super(forBodyCommands, agents);
		this.forEachSet = forEachSet;
	}

	public NegotiationForAbsEach(
		List<E> forEachSet,
		ICommandConstruction ... forBodyCommands
	) {
		this(
			forEachSet,
			forBodyCommands,
			new ArrayList<INegotiatingAgent>()
		);
	}

	public NegotiationForAbsEach(List<E> forEachSet) {
		this(
			forEachSet,
			ICommandConstruction.EMPTY_ARRAY
		);
	}

	public NegotiationForAbsEach() {
		this(Collections.<E>emptyList());
	}

	@Override
	public Iterable<E> getIterable() {
		return forEachSet;
	}

	public void setForEachSet(List<E> forEachSet) {
		this.forEachSet = forEachSet;
	}
}
